<!doctype html>
<html>

<head>
	<meta charset="utf-8">
	<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
	<meta name="format-detection" content="telephone=no" />
	<title>首页</title>
	<link rel="stylesheet" type="text/css" href="../c/aui.css" />
	<style>
		body {
		background-color:transparent;
		}

	</style>
</head>

<body>
	<div class="surePass">
    <div class="anyield">
    <p><span>10.33</span>%<i>+</i><span>1.2</span>%</p>
    <p>预期年化收益</p>
    </div>
    <canvas class="circleRun" data-run="0" id="canvasThree" amout="1000" nowData="1000"></canvas>
    </div>
    var findCanvas=$("#canvasThree");
    var percents=findCanvas.attr('nowData')/findCanvas.attr('amout');
    percents=0.25;
    //percents 为百分比的值  范围 0- 1
    runCircle(
       {
        obj:'canvasThree',
        percent:0.25,
        url:'image/fire.png',   //飞机小图地址
        imgWidth:30,
        imgHeight:30,
        circleBottomColor:"#e6eaed",//圆环底色
        outerColorStart:'#ebf7ff',  //外部圆环 渐变色
        outerColorMid:'#d8eefc',
        outerColorEnd:'#a7cee7',
        innerColorStart:'#6fbef0',  //内部圆环 渐变色
        innerColorEnd:'#058ee4',
       }
    );
    var run= runCircle(
       {
        obj:'canvasThree2',
        percent:1
       }
    );
    runCircle(
       {
        obj:'canvasThree3',
        percent:0.75
       }
    );;
    var count=0;
    $(".circleRun").each(function(){
        var obj=$(this)[0];
        var canvasW=parseInt($(this).parent().width())*0.76;
        obj.width = canvasW;
        obj.height = canvasW;
        $(".restart")[0].style.height= canvasW+"px";
    })
    var reTimer;
    $(".restart").click(function(){
         var run=$("#canvasThree2").attr("data-run");
         if(run==0){
             clearTimeout(reTimer)
             reTimer=setTimeout(function(){
                  runCircle({
                    obj:'canvasThree2',
                    percent:1
                   })
             },200)
         }else{
             clearTimeout(reTimer)
            return;
         }
    })
</body>
<script type="text/javascript" src="../j/api.js"></script>
<script type="text/javascript">
	apiready = function() {}
	function x(){
		urls();
		api.closeFrame();
	}
</script>

</html>
